-
Notifications
You must be signed in to change notification settings - Fork 0
feat: enforce British English in AI output and remove all emoji from UI #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
British English Implementation: - Added buildBritishEnglishInstructions() helper to shared-components.ts - Integrated British English guidance into all prompt factories: * Metis standalone module generation * Metis course-aware module generation * Metis module overview generation * Themis course structure generation - Covers spelling (colour/flavour/behaviour), grammar (licence/license), and phrasing (learnt/amongst) conventions - Applies to all AI-generated content (descriptions, objectives, briefs) Emoji Removal: - Removed 54+ emoji instances from 20 files across the application - Replaced with HTML entities (✓, ×) or plain text - Updated components in metis/, theia/, themis/, errors/, and routes/ - Changed build script console output: ✅/❌ → [SUCCESS]/[ERROR] - Improved accessibility and screen reader compatibility Files Modified: - 3 prompt factories (+45 lines for British English) - 19 UI components (~700 lines emoji removal) - 1 build script (console output) - 2 roadmap documents (task completion) - 1 implementation record (comprehensive documentation) Impact: - All future AI generations will use British English consistently - Professional, emoji-free UI across all workflows - Zero breaking changes, build passes successfully Closes #[issue-number-if-exists]
SummaryExcellent implementation of British English enforcement and emoji cleanup. The PR demonstrates strong architectural awareness by creating reusable components, maintaining consistency across all prompt factories, and documenting changes comprehensively. The changes are non-breaking, focused, and well-tested. A few minor observations around emoji handling in error states and potential test coverage opportunities, but overall this is production-ready code. 🎯 Code Quality & Best PracticesStrengthsExcellent use of existing patterns:
Clear, maintainable code:
Documentation excellence:
Minor ObservationsEmoji in validation prompts (line 43): return `⚠️ PREVIOUS ATTEMPT FAILED VALIDATION ⚠️The
HTML entity inconsistency:
Recommendation: Standardize on HTML entities for better rendering across contexts. 🐛 Potential IssuesNo Critical Issues FoundThe implementation is solid with no breaking changes or bugs identified. Minor ConsiderationsLicence vs License usage:
However, consider adding a usage example in the instructions, as this is a common source of errors: // Current
- licence (noun), license (verb); practice (noun), practise (verb)
// Suggestion
- licence (noun: "software licence"), license (verb: "to license software")
- practice (noun: "best practice"), practise (verb: "to practise coding")Regression risk - emoji in user-facing error messages:
⚡ Performance ConsiderationsPositive ImpactReduced bundle size:
No performance concerns:
OpportunitiesConsider memoization (optional, low priority): let cachedInstructions: string | null = null;
export function buildBritishEnglishInstructions(): string {
if (cachedInstructions) return cachedInstructions;
cachedInstructions = `IMPORTANT: Use British English...`;
return cachedInstructions;
}However, this is likely premature optimization given the function is only called once per generation request. 🔒 Security ConcernsNo Security IssuesThis PR contains no security vulnerabilities. Changes are limited to:
ObservationsPrompt injection resistance: Output sanitization: ✅ Test CoverageBuild VerificationThe PR description confirms:
Coverage GapsRecommended additions (not blocking for merge):
Testing PriorityHigh priority: Unit tests for the new function (ensures the instruction text is correct) Per CLAUDE.md guidance on "minimal breaking changes" and "zero breaking changes to existing APIs" - the lack of pre-existing tests for prompt components suggests this is consistent with the codebase's current test strategy. However, adding tests would improve maintainability. Verdict✅ Approved - This PR is well-crafted and ready to merge. The implementation is clean, follows existing patterns, and achieves both stated goals (British English enforcement and emoji removal). The documentation is exemplary. Optional Follow-ups (Post-Merge)
Great work! 🎉 (Last emoji, I promise.) |
British English Implementation:
Emoji Removal:
Files Modified:
Impact:
Closes #[issue-number-if-exists]